<link rel="stylesheet" href="<?php echo URL::base() ?>media/vendor/css/style.css" type="text/css" media="all" />
<link rel="stylesheet" href="<?php echo URL::base() ?>media/vendor/artdialog/skins/default.css" type="text/css" media="all" />
<link href="<?php echo URL::base() ?>media/vendor/css/ui-lightness/jquery-ui-1.10.4.custom.css" rel="stylesheet">
<link href="<?php echo URL::base() ?>media/vendor/fixtable/css/component.css" rel="stylesheet">
<link href="<?php echo URL::base() ?>media/vendor/fixtable/css/normalize.css" rel="stylesheet">
<link href="<?php echo URL::base() ?>media/vendor/css/jquery-ui-timepicker-addon.min.css" rel="stylesheet">
<script src="<?php echo URL::base() ?>media/vendor/js/jquery-1.10.2.js"></script>
<script src="<?php echo URL::base() ?>media/vendor/js/jquery-ui-1.10.4.custom.js"></script>
<script src="<?php echo URL::base() ?>media/vendor/js/jquery-ui-timepicker-addon.min.js"></script>
<script src="<?php echo URL::base() ?>media/vendor/js/jquery-ui-timepicker-zh-CN.js"></script>
<script src="<?php echo URL::base() ?>media/vendor/js/jquery.ui.datepicker-zh-TW.js"></script>
<script src="<?php echo URL::base() ?>media/vendor/js/Validform_v5.3.2_ncr_min.js"></script>
<script src="<?php echo URL::base() ?>media/vendor/artdialog/jquery.artDialog.js"></script>	   
<script src="<?php echo URL::base() ?>media/vendor/js/jquery.printPage.js"></script>
<script type="text/javascript">
$(function() {
	//上传表格
    $(".upSuppForm").Validform({
        tiptype:2,});
     });
</script>
<?php if(isset($message)){echo $message;}?>
<hr/>
<?php if(isset($result['flag'])){?>
<table>
<?php foreach ($result as $key=>$_result){
if($key != 'flag'){
switch ($_result){
case 0:?>
	<tr><td>第<?php echo $key;?>行: </td><td>出库类型为空或0</td></tr>
<?php break;case 1:?>
	<tr><td>第<?php echo $key;?>行: </td><td>SKU为空</td></tr>
<?php break;case 2:?>
	<tr><td>第<?php echo $key;?>行: </td><td>行数量不符合规则</td></tr>
<?php break;case 3:?>
	<tr><td>第<?php echo $key;?>行: </td><td>日期为空</td></tr>
<?php break;case 4:?>
	<tr><td>第<?php echo $key;?>行: </td><td>日期不符合规则</td></tr>
<?php break;case 5:?>
	<tr><td>第<?php echo $key;?>行: </td><td>SKU有误</td></tr>
<?php break;case 6:?>
	<tr><td>第<?php echo $key;?>行: </td><td>出库类型有误</td></tr>
<?php break;case 7:?>
	<tr><td>第<?php echo $key;?>行: </td><td>数量超出库存量</td></tr>
<?php }}}?>
</table>
<?php }?>
<div class="row">
  <div class="span11">
  <h2>出库批量上传数据：</h2>
  <form class="upSuppForm" method='post' action='<?php echo URL::site() ?>inventory/delivery/upload_delivery' enctype="multipart/form-data">
  <table class="table ">
     <tr>
       <td class="need"></td>
                    <td>批量上传</td>
                    <td> <input type='file'   style="line-height: 0px;" name='xls' class="inputxt" datatype="/.+\.xls/"  nullmsg="请选择上传文件"  errormsg="文件格式只能为xls"/></td>
                    <td><div class="Validform_checktip"></div></td>
      </tr>
      <tr>
	       <td class="need"></td>
	       <td></td>
	       <td colspan="2">
	       </td>
      </tr>
     </table>
      <input type='submit' value='上传' class='btn btn-success' />
    <div class="btn btn-success"><a href="<?php echo URL::site() ?>inventory/delivery/down_template" style="color: #ffffff">下载模版</a></div>
  </form>
  
  </div>
</div>